﻿using System;
using Abp.Application.Services.Dto;
using Abp.Extensions;
using Abp.Runtime.Validation;
using LeadThing.AbpZeroTemplate.Dto;

namespace LeadThing.AbpZeroTemplate.GridPersons.Dtos
{
    /// <summary>
    /// 网格基本信息查询Dto
    /// </summary>
    public class GetGridPersonInput : PagedAndSortedInputDto, IShouldNormalize
    {
        //DOTO:在这里增加查询参数

        /// <summary>
        /// 模糊查询参数
        /// </summary>
        public string Filter { get; set; }
        
        /// <summary>
        /// 人员姓名
        /// </summary>
        public string PersonName { get; set; }


        /// <summary>
        /// 人员手机号
        /// </summary>
        public string PersonPhone { get; set; }


        /// <summary>
        /// 身份证号
        /// </summary>
        public string IDCard { get; set; }
        
        /// <summary>
        /// 网格员姓名
        /// </summary>
        public string GridName { get; set; }


        /// <summary>
        /// 网格员手机号
        /// </summary>
        public string GridPhone { get; set; }


        /// <summary>
        /// 协管员姓名
        /// </summary>
        public string AssistName { get; set; }


        /// <summary>
        /// 协管员手机号
        /// </summary>
        public string AssistPhone { get; set; }

        
        /// <summary>
        /// 镇
        /// </summary>
        public int TownID { get; set; }

        /// <summary>
        /// 区
        /// </summary>
        public int AreaID { get; set; }

        /// <summary>
        /// 村庄
        /// </summary>
        public int VillageID { get; set; }


        /// <summary>
        /// 用于排序的默认值
        /// </summary>
        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "Id";
            }
        }
    }
}
